using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class GetPSMImgRequest : GeneratedMessageLite<GetPSMImgRequest, GetPSMImgRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<GetPSMImgRequest, GetPSMImgRequest.Builder>
		{
			private bool resultIsReadOnly;
			private GetPSMImgRequest result;
			protected override GetPSMImgRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override GetPSMImgRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override GetPSMImgRequest DefaultInstanceForType
			{
				get
				{
					return GetPSMImgRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public string URL
			{
				get
				{
					return this.result.URL;
				}
				set
				{
					this.SetURL(value);
				}
			}
			public uint Offset
			{
				get
				{
					return this.result.Offset;
				}
				set
				{
					this.SetOffset(value);
				}
			}
			public Builder()
			{
				this.result = GetPSMImgRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(GetPSMImgRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private GetPSMImgRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					GetPSMImgRequest other = this.result;
					this.result = new GetPSMImgRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override GetPSMImgRequest.Builder Clear()
			{
				this.result = GetPSMImgRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override GetPSMImgRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new GetPSMImgRequest.Builder(this.result);
				}
				return new GetPSMImgRequest.Builder().MergeFrom(this.result);
			}
			public override GetPSMImgRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override GetPSMImgRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is GetPSMImgRequest)
				{
					return this.MergeFrom((GetPSMImgRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override GetPSMImgRequest.Builder MergeFrom(GetPSMImgRequest other)
			{
				return this;
			}
			public override GetPSMImgRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override GetPSMImgRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(GetPSMImgRequest._getPSMImgRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = GetPSMImgRequest._getPSMImgRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 18u)
						{
							this.result.hasURL = input.ReadString(ref this.result.uRL_);
							continue;
						}
						if (num3 == 24u)
						{
							this.result.hasOffset = input.ReadUInt32(ref this.result.offset_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public GetPSMImgRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public GetPSMImgRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public GetPSMImgRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public GetPSMImgRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public GetPSMImgRequest.Builder SetURL(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasURL = true;
				this.result.uRL_ = value;
				return this;
			}
			public GetPSMImgRequest.Builder ClearURL()
			{
				this.PrepareBuilder();
				this.result.hasURL = false;
				this.result.uRL_ = "";
				return this;
			}
			public GetPSMImgRequest.Builder SetOffset(uint value)
			{
				this.PrepareBuilder();
				this.result.hasOffset = true;
				this.result.offset_ = value;
				return this;
			}
			public GetPSMImgRequest.Builder ClearOffset()
			{
				this.PrepareBuilder();
				this.result.hasOffset = false;
				this.result.offset_ = 0u;
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int URLFieldNumber = 2;
		public const int OffsetFieldNumber = 3;
		private static readonly GetPSMImgRequest defaultInstance;
		private static readonly string[] _getPSMImgRequestFieldNames;
		private static readonly uint[] _getPSMImgRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasURL;
		private string uRL_ = "";
		private bool hasOffset;
		private uint offset_;
		private int memoizedSerializedSize = -1;
		public static GetPSMImgRequest DefaultInstance
		{
			get
			{
				return GetPSMImgRequest.defaultInstance;
			}
		}
		public override GetPSMImgRequest DefaultInstanceForType
		{
			get
			{
				return GetPSMImgRequest.DefaultInstance;
			}
		}
		protected override GetPSMImgRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public string URL
		{
			get
			{
				return this.uRL_;
			}
		}
		public uint Offset
		{
			get
			{
				return this.offset_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.hasOffset && this.BaseRequest.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasURL)
				{
					num += CodedOutputStream.ComputeStringSize(2, this.URL);
				}
				if (this.hasOffset)
				{
					num += CodedOutputStream.ComputeUInt32Size(3, this.Offset);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private GetPSMImgRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] getPSMImgRequestFieldNames = GetPSMImgRequest._getPSMImgRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, getPSMImgRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasURL)
			{
				output.WriteString(2, getPSMImgRequestFieldNames[2], this.URL);
			}
			if (this.hasOffset)
			{
				output.WriteUInt32(3, getPSMImgRequestFieldNames[1], this.Offset);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasURL)
			{
				num ^= this.uRL_.GetHashCode();
			}
			if (this.hasOffset)
			{
				num ^= this.offset_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			GetPSMImgRequest getPSMImgRequest = object_0 as GetPSMImgRequest;
			return getPSMImgRequest != null && (this.hasBaseRequest == getPSMImgRequest.hasBaseRequest && (!this.hasBaseRequest || this.baseRequest_.Equals(getPSMImgRequest.baseRequest_))) && (this.hasURL == getPSMImgRequest.hasURL && (!this.hasURL || this.uRL_.Equals(getPSMImgRequest.uRL_))) && (this.hasOffset == getPSMImgRequest.hasOffset && (!this.hasOffset || this.offset_.Equals(getPSMImgRequest.offset_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<GetPSMImgRequest, GetPSMImgRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<GetPSMImgRequest, GetPSMImgRequest.Builder>.PrintField("URL", this.hasURL, this.uRL_, writer);
			GeneratedMessageLite<GetPSMImgRequest, GetPSMImgRequest.Builder>.PrintField("Offset", this.hasOffset, this.offset_, writer);
		}
		public static GetPSMImgRequest ParseFrom(byte[] data)
		{
			return GetPSMImgRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private GetPSMImgRequest MakeReadOnly()
		{
			return this;
		}
		public static GetPSMImgRequest.Builder CreateBuilder()
		{
			return new GetPSMImgRequest.Builder();
		}
		public override GetPSMImgRequest.Builder ToBuilder()
		{
			return GetPSMImgRequest.CreateBuilder(this);
		}
		public override GetPSMImgRequest.Builder CreateBuilderForType()
		{
			return new GetPSMImgRequest.Builder();
		}
		public static GetPSMImgRequest.Builder CreateBuilder(GetPSMImgRequest prototype)
		{
			return new GetPSMImgRequest.Builder(prototype);
		}
		static GetPSMImgRequest()
		{
			GetPSMImgRequest.defaultInstance = new GetPSMImgRequest().MakeReadOnly();
			GetPSMImgRequest._getPSMImgRequestFieldNames = new string[]
			{
				"BaseRequest",
				"Offset",
				"URL"
			};
			GetPSMImgRequest._getPSMImgRequestFieldTags = new uint[]
			{
				10u,
				24u,
				18u
			};
			object.ReferenceEquals(micromsg.Proto.GetPSMImgRequest.Descriptor, null);
		}
	}
}
